gotodetail = function(des, obj) {
	mui.openWindow({
		url: des,
		extras: {
			postid: $(obj).data("postid")
		}
	});
}

var time_sub,x_index='',x_text;
	addlist = function(data,obj) {
		for(var key in data) {
			//时间
			time_sub = data[key].time;
			time_sub = data[key].time.substring(0,10);
			//图片
			for(var pic_num = 0;pic_num<3;pic_num++){
				if(data[key].pic[pic_num] != null || data[key].pic[pic_num] != ""){
					x_text='<img src="'+data[key].pic[pic_num]+'" alt="">';
					x_index+=x_text;
				}
			}
			var dom = '<li class="Tieba_list"  onclick="gotodetail(\'sub_find_tieba_detail_text.html\',this)" data-postid="'+data[key].fakeid+'" class="mui-table-view-cell mui-media">' +
					'<a href="javascript:;">' +
					'<img id="listheadurl" class="mui-media-object mui-pull-left" src="'+data[key].headurl+'">' +
					'<div class="mui-media-body">' +
					'<h5 id="listwriter">'+data[key].username+'</h5>' +
					'<h4 id="listtitle">'+data[key].title+'</h4>' +
					'<div class="mui_body_img">'+x_index+'</div>' +
					'<p><span id="time">'+time_sub+'</span><span id="discuss" class="mui-icon mui-icon-chatbubble mui-pull-right">'+data[key].commentcount+'</span></p>' +
					'</div>' +
					'</a>' +
					'</li>';
			$(obj).append(dom);
			x_index='';
			x_text='';
		}
}


gotoerror = function() {

		var dom = '<div style="text-align:center;margin-top:30px;color:grey;"> \
						关注加载中...请下拉刷新\
					</div>';
		$("#spread").append(dom);

}

